package com.ruoyi.project.relation.service;

import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.project.relation.domain.BusinessRelation;
import com.ruoyi.project.relation.domain.dto.BusinessRelationDO;
import com.ruoyi.project.relation.domain.qo.BusinessRelationQO;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

/**
 * 物料清单关联Service接口
 *
 * @author wb
 * @date 2021-03-28
 */
public interface IBusinessRelationService
{

    /**
     * 精确查询物料清单关联列表,用于逻辑关联表处理
     *
     * @param businessRelationQO 物料清单关联
     * @return 物料清单关联集合
     */
    public List<BusinessRelation> exactQueryBusinessRelationList(BusinessRelationQO businessRelationQO);


    /**
     * 增加多个进行互相关联
     * @param businessRelationDOs
     */
    public void addMultipleInterrelate(BusinessRelationDO... businessRelationDOs) ;

    /**
     * 增加关联
     * @param sourceBusinessRelationDO
     * @param targetBusinessRelationDO
     * @param sysUser
     * @param nowDate
     */
    public void addInterrelate(BusinessRelationDO sourceBusinessRelationDO, BusinessRelationDO targetBusinessRelationDO, SysUser sysUser, Date nowDate);


    /**
     * 增加关联
     * @param sourceBusinessRelationDO
     * @param targetBusinessRelationDO
     * @param sysUser
     * @param nowDate
     */
    public void addInterrelate(BusinessRelationDO sourceBusinessRelationDO, BusinessRelationDO targetBusinessRelationDO);

    public void deleteBusinessRelationByBusinessRelationDO(BusinessRelationDO businessRelationDO);
}
